I Chronicles 28:3 Midrash

וְהָאֱלֹהִים֙ אָ֣מַר לִ֔י לֹא־תִבְנֶ֥ה בַ֖יִת לִשְׁמִ֑י כִּ֣י אִ֧ישׁ מִלְחָמ֛וֹת אַ֖תָּה וְדָמִ֥ים שָׁפָֽכְתָּ׃

But God said unto me: Thou shalt not build a house for My name, because thou art a man of war, and hast shed blood.

Read midrashic interpretation of I Chronicles 28:3: and classical rabbinic exegesis.